﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace Dapper_Core.Basic
{
    public class ReflectionUtility
    {
        public static T CreateInstance<T>(string nameSpace, string className)
        {
            string fullClassName = nameSpace + "." + className;
            return (T)Assembly.Load(nameSpace).CreateInstance(fullClassName);
        }

        public static T CreateInstance<T>(string fullTypeName)
        {
            return (T)Activator.CreateInstance(Type.GetType(fullTypeName));
        }
    }
}
